prevent a few implicit truncating FP conversions#5804
Conversation
|
Thanks for your pull request, @bbasile! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Some tips to help speed things up:
Bear in mind that large or tricky changes may require multiple rounds of review and revision. Please see CONTRIBUTING.md for more information. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
andralex
left a comment
There was a problem hiding this comment.
Are there visible improvements in the generated code?
std/numeric.d
Outdated
| lastRow[i] = 1; // -sin(pi * 3 / 2) == 1 | ||
| else | ||
| lastRow[i] = -sin(i * 2.0L * PI / size); | ||
| lastRow[i] = -sin(i * cast(float)(2.0 * PI) / size); |
There was a problem hiding this comment.
use float(2.0 * PI) here instead
|
Improvements are not the point of the PR which is rather to remove the warnings emitted in case dlang/dmd#7240 (comment) would be accepted, but the test failures show that the change cause problems. |
|
I see, thanks. cc @WalterBright |
Prevent warnings emitted after a possible compiler change.